<?php

/* 会员 member */
class VcategoryModel extends BaseModel
{
	var $table  = 'vcategory';
	var $prikey = 'cate_id';
	var $_name  = 'vcategory'; 
	
	/*
	 * 检查名称唯一
	 * */
   function unique($cate_name,  $cate_id = 0)
    {
        $conditions = "   cate_name = '$cate_name' and  cate_id !=$cate_id";        
        return count($this->find(array('conditions' => $conditions))) == 0;
    }
}

?>